main(){
  var s1 = "1234";
  int n1 = int.parse(s1);
  print(n1);
  print(n1 is int);

  try{
    var s2 = "1234.56ABC7";     //Dart和JS不一样：如果遇到不能解析的字符，不是终止解析而是抛出异常
    double n2 = double.parse(s2);
    print(n2);
    print(n2 is double);
  }catch(err){
    print('小数字符串解析时抛出异常');
  }

  print('程序运行结束');
}